package com.two.screen.water.balance.adapter

import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.two.screen.water.balance.R
import com.two.screen.water.balance.widget.mybanner.banner.adapter.BannerAdapter
import com.two.screen.water.balance.widget.mybanner.banner.util.BannerUtils

class BottomBannerAdapter(var tipsList: MutableList<String>? = null) : BannerAdapter<String, RecyclerView.ViewHolder>(tipsList) {
    override fun onCreateHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder {
        return TipsHolder(BannerUtils.getView(parent!!, R.layout.item_bottom_tips_banner))
    }

    override fun onBindView(holder: RecyclerView.ViewHolder?, data: String, position: Int, size: Int) {
        (holder as TipsHolder).tipsTv.text = data
    }


    class TipsHolder(view: View) : RecyclerView.ViewHolder(view) {
        var tipsTv: TextView = view as TextView
    }
}